package com.meida.module.bus.provider.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import com.meida.common.mybatis.model.*;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RestController;
import com.meida.common.springmvc.base.BaseController;
import com.meida.module.bus.client.entity.BusSrmApiExpLog;
import com.meida.module.bus.provider.service.BusSrmApiExpLogService;


/**
 * PMS-SRM异常交互日志控制器
 *
 * @author flyme
 * @date 2020-12-22
 */
@RestController
@RequestMapping("/bus/srmApiExpLog/")
public class BusSrmApiExpLogController extends BaseController<BusSrmApiExpLogService, BusSrmApiExpLog>  {

    @ApiOperation(value = "PMS-SRM异常交互日志-分页列表", notes = "PMS-SRM异常交互日志分页列表")
    @GetMapping(value = "page")
    public ResultBody pageList(@RequestParam(required = false) Map params) {
        return bizService.pageList(params);
    }

    @ApiOperation(value = "PMS-SRM异常交互日志-列表", notes = "PMS-SRM异常交互日志列表")
    @GetMapping(value = "list")
    public ResultBody list(@RequestParam(required = false) Map params) {
        return bizService.listEntityMap(params);
    }

    @ApiOperation(value = "PMS-SRM异常交互日志-添加", notes = "添加PMS-SRM异常交互日志")
    @PostMapping(value = "save")
    public ResultBody save(@RequestParam(required = false) Map params) {
        return bizService.add(params);
    }

    @ApiOperation(value = "PMS-SRM异常交互日志-更新", notes = "更新PMS-SRM异常交互日志")
    @PostMapping(value = "update")
    public ResultBody update(@RequestParam(required = false) Map params) {
        return bizService.edit(params);
    }

    @ApiOperation(value = "PMS-SRM异常交互日志-删除", notes = "删除PMS-SRM异常交互日志")
    @PostMapping(value = "remove")
    public ResultBody remove(@RequestParam(required = false) Map params) {
        return bizService.delete(params);
    }


    @ApiOperation(value = "PMS-SRM异常交互日志-详情", notes = "PMS-SRM异常交互日志详情")
    @GetMapping(value = "get")
    public ResultBody get(@RequestParam(required = false) Map params) {
        return bizService.get(params);
    }
    /**
    * 导出PMS-SRM异常交互日志统计
    *
    * @param params
    * @param request
    * @param response
    */
    @PostMapping(value = "export")
    public void export(@RequestParam(required = false) Map params, HttpServletRequest request, HttpServletResponse response) {
        bizService.export(params, request, response, "PMS-SRM异常交互日志统计", "PMS-SRM异常交互日志统计表");
    }

}
